package com.hqx.oop.constructor;

import java.util.Date;

public class Customer {
    private String name;
    private int age;
    private Date birthDate;

    public Customer(String name, int age, Date d) {
        this.name = name;
        this.age = age;
        this.birthDate = d;
    }

    public Customer(String name,int age) {
        this(name,age,null);
    }

    public Customer(String name,Date date) {
        this(name,30,date);
    }

    public Customer(String name) {
        this(name,30);
    }

    @Override
    public String toString() {
        return "Customer{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", birthDate=" + birthDate +
                '}';
    }

    public static void main(String[] args) {
        Customer customer = new Customer("hqx");
        System.out.println(customer);
    }
}
